package com.itstyle.mytest.queue.blockingQueueTest;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

/**
 * @author xianguang
 * @date 2019-12-31 11:24
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> blockingQueue=new ArrayBlockingQueue<>(100);
        Thread a=new Thread(new Producer(blockingQueue));
        Thread b=new Thread(new Consumer(blockingQueue));
        a.start();
        //a.join();
        b.start();


    }
}
